package com.zut.fitness.controller;


import com.zut.fitness.common.Result;
import com.zut.fitness.pojo.vo.CoachImageVo;
import com.zut.fitness.service.IFitnessCoachService;
import com.zut.fitness.pojo.FitnessCoach;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 教练列表Controller
 * 
 * @author admin
 * @date 2025-01-04
 */
@RestController
@RequestMapping("/Coach")
public class FitnessCoachController
{
    @Autowired
    private IFitnessCoachService fitnessCoachService;

    /**
     * 查询教练列表列表
     */

    @GetMapping("/list")
    public Result<List<CoachImageVo>> list()
    {

        List<CoachImageVo> list = fitnessCoachService.selectFitnessCoachList();
        return Result.success(list);
    }



    /**
     * 获取教练列表详细信息
     */

    @GetMapping(value = "/{id}")
    public Result getInfo(@PathVariable("id") Long id)
    {
        return Result.success(fitnessCoachService.selectFitnessCoachById(id));
    }


}
